package com.xiaomi.service.impl;

import com.xiaomi.entity.Tuijian;
import com.xiaomi.mapper.TuijianMapper;
import com.xiaomi.service.TuijianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @ClassName TuijianServiceImpl
 * @Description TODO
 * @Author zcy
 * @Date 2021/11/27 16:41
 * @Version 1.0
 **/
@Service
public class TuijianServiceImpl implements TuijianService {
    @Autowired
    private TuijianMapper tuijianMapper;
    @Override
    public List<Tuijian> pageSearch(Map<String,Object> pars) {
        return tuijianMapper.pageSearch(pars);
    }

    @Override
    public Integer getCount(Map<String,Object> pars) {
        return tuijianMapper.getCount(pars);
    }

    @Override
    @Transactional
    public void insert(Tuijian tuijian) {
        tuijianMapper.insert(tuijian);
    }

    @Override
    @Transactional
    public void update(Tuijian tuijian) {
        tuijianMapper.update(tuijian);
    }

    @Override
    public void delete(Integer tjId) {
tuijianMapper.delete(tjId);
    }

    @Override
    public void sjupdate(Integer shangJia, Integer tjId) {
        tuijianMapper.sjupdate(shangJia,tjId);
    }


}
